#ifndef __FS_POLL_H__
#define __FS_POLL_H__

#include <types.h>
#include <evtloop.h>
#include <softtimer.h>
#include <fs.h>

struct file_poll
{
    ev_loop_t  *loop;
    const char *path;
    ev_fs_t     req;
    struct soft_timer poll_timer;
    long        msec;
    void (*poll_cb)(struct file_poll *fp);
};

int fs_poll_add(struct file_poll *fp, ev_loop_t *loop, const char *path, u32 interval,
                void (*poll_cb)(struct file_poll *fp));
void fs_poll_del(struct file_poll *fp);
#endif
